Technical Specification · Step 14

MGRM Medicare — Dual-Experience Website
Complete Technical Specification

Technology stack, conditional content rules, SEO architecture, security & compliance, and 25-point dual-launch checklist for the B2C consumer site and B2B institutional microsite on a single domain.

Single domain: mgrmmedicare.com B2C: public consumer e-commerce B2B: /institutional — gated portal Single product catalogue, dual pricing
Section 1

Recommended Technology Stack

This dual-audience site requires a platform that handles: consumer e-commerce (cart, checkout, consumer accounts), an authenticated B2B microsite with different pricing and content, a single product catalogue powering both experiences, and a clean single-domain URL structure. The platform decision drives every other technical choice.

1.1 — CMS / E-commerce Platform: Evaluation & Recommendation

Recommendation: Next.js (custom) + Medusa.js Commerce Engine
The dual-audience requirement — one product catalogue, two pricing models, two navigation systems, two content display states, a gated B2B sub-path, and complex conditional rendering — exceeds what any off-the-shelf platform handles cleanly. A headless commerce architecture (Medusa.js as the commerce engine + Next.js as the frontend) gives complete control over the user experience for both audiences while keeping the product catalogue, pricing rules, and order management in a single database.
✓ Recommended Next.js (headless frontend) + Medusa.js (commerce engine)
Why it works for MGRM
Single codebase controls both B2C and B2B UI — conditional rendering based on auth state is straightforward React logic, not a platform workaround.
Medusa.js supports multiple customer groups with separate pricing — B2C consumer pricing and B2B institutional tier pricing live in the same database, served to the correct audience via middleware.
/institutional is a Next.js route with server-side auth guard — clean URL structure, no subdomain complexity, no redirect gymnastics.
Full control over the Add to Cart vs Add to Quote flow at component level — no platform plugin required.
API-first: CRM, payment gateways, telemedicine, and compliance document systems all integrate via REST/webhook — no plugin marketplace dependency.
SSR (server-side rendering) for B2C pages ensures full Google crawlability. B2B pages are rendered only after auth — naturally excluded from crawl.
Medusa.js is open-source and self-hostable — institutional pricing data never lives on a third-party SaaS with shared infrastructure.
Tradeoffs
Higher initial build cost than an off-the-shelf platform — but the dual-audience requirement makes customisation unavoidable regardless of platform choice.
Requires a development team with Next.js/React expertise — not a CMS for non-technical editors without a headless CMS layer (Contentful or Sanity recommended for content management).
Verdict: The only option that handles the dual-audience requirement natively without significant platform workarounds. The complexity is front-loaded in architecture, not scattered across plugins and hacks.
Viable alternative Shopify Plus + B2B Portal App (e.g. Wholesale Gorilla or custom)
Strengths
Shopify Plus natively supports multiple customer groups with different price lists — institutional pricing can be set up without custom development.
Excellent checkout reliability, payment gateway coverage, and consumer app ecosystem.
Lower operational overhead than a fully custom stack — hosting, security patching, and PCI DSS Level 1 compliance are handled by Shopify.
Limitations for MGRM
The /institutional gated microsite requires a custom Shopify app or headless extension — Shopify's native B2B features do not support a completely separate authenticated portal with its own navigation, document library, quote system, and compliance centre.
The quote system (Add to Quote → Quote Request → AM review → Quote sent → Accepted → Order Raised) is not a native Shopify flow — requires a custom app at significant additional cost.
Compliance document library, clinical evidence section, and training resources have no Shopify equivalent — these would need a separate system with SSO to the Shopify account.
Shopify Plus costs approx. USD 2,000/month — on top of custom app development costs, the total may exceed the custom stack.
Verdict: Viable if the B2B portal scope is significantly reduced to just institutional pricing and basic ordering. Not viable if the full Steps 10–13 portal specification is implemented.
Use with caution Magento (Adobe Commerce)
Strengths
Native B2B module includes company accounts, negotiated pricing, purchase orders, and quote management — the closest out-of-the-box match to the MGRM B2B requirements.
Highly configurable product catalogue with custom pricing rules per customer group.
Limitations
Total cost of ownership is extremely high: Adobe Commerce licensing, hosting (requires dedicated servers), and developer costs are significantly higher than the recommended stack.
The frontend (PHP Luma or PWA Studio) requires significant customisation to match the MGRM B2C design system — the warm consumer UX defined in Steps 1–9 is not achievable with minimal effort.
Security patching, performance optimisation, and ongoing maintenance complexity is high — not ideal for a lean MGRM team.
Verdict: Technically capable but overbuilt and overpriced for MGRM's scale. Adobe Commerce is designed for enterprise retailers with dedicated Magento engineering teams.
Not recommended WooCommerce
Apparent strengths
Low initial cost. Large plugin ecosystem. Familiar to many developers.
Why it fails for MGRM
WooCommerce B2B functionality requires stacking 4–6 third-party plugins (wholesale pricing, company accounts, quote system, role-based access) — reliability and compatibility degrade with each added plugin.
PHP/WordPress is not designed for server-side conditional content rendering at the component level — implementing the B2C/B2B content switching cleanly requires significant custom development that negates the platform's simplicity advantage.
Performance at catalogue scale (100+ products, complex pricing rules) requires expensive caching and hosting infrastructure that removes the cost advantage.
The telemedicine booking, health profile, and compliance document library have no WooCommerce equivalent — these are entirely custom integrations regardless.
Verdict: Appropriate for a simple single-audience e-commerce site. Not appropriate for the MGRM dual-experience architecture.
Not recommended Webflow Commerce
Why it fails for MGRM
No native B2B pricing or company account management. No quote system. No server-side conditional rendering — the B2B gating would require a third-party auth layer and significant custom logic.
Webflow Commerce is designed for design-forward D2C brands with simple checkout — the MGRM B2B operational requirements (quote workflow, PO management, compliance document library) are entirely outside its scope.
Verdict: Webflow could be used for the B2C marketing pages as a CMS, but not as the commerce engine for the dual-audience MGRM platform.

1.2 — B2B Portal Layer

The B2B institutional microsite is not a separate application — it is a gated route group within the same Next.js application, sharing the same product catalogue and authentication service, with different components, pricing data, and navigation rendered based on the authenticated user's customer group.

B2B portal technical architecture
URL structuremgrmmedicare.com/institutional/* — handled by Next.js App Router route group. All routes in /app/(b2b)/institutional/ are wrapped in an authentication layout component that checks for a valid B2B session token before rendering.
Auth guardServer component layout.tsx in the (b2b) route group makes a server-side call to the auth service. If no valid B2B token exists, it redirects to /institutional/login — never exposes any institutional content to unauthenticated requests, including price data.
Customer groupsMedusa.js customer groups: CONSUMER (all registered B2C users), INSTITUTIONAL_T1 (Tier 1 verified buyers), INSTITUTIONAL_T2 (Partner Accounts), INSTITUTIONAL_T3 (Strategic Partners). Each group has different price list associations in the product catalogue.
Pricing resolutionWhen an institutional user's session is validated, their customer group ID is included in the session token. All product queries from the B2B portal include the customer group ID — Medusa.js returns the correct institutional price list rather than the consumer price list.
B2B-only contentCompliance documents, clinical evidence library, training resources, marketing collateral, quote system, and order management are Next.js pages/components that only exist in the /institutional route group. They are never rendered on the public B2C site.
Shared componentsThe product catalogue data is shared — the same product names, SKUs, specifications, and images are used in both B2C and B2B. Only the price display component, CTA component (Add to Cart vs Add to Quote), and navigation component differ between the two experiences.

1.3 — Authentication: B2C vs B2B

Decision: Separate auth systems, single SSO layer
B2C consumer accounts and B2B institutional accounts use separate identity records — a consumer account cannot escalate to a B2B account without the registration and verification flow. However, both systems share the same Auth0 tenant (or equivalent) with different application clients, allowing SSO for users who hold both account types.
Authentication architecture
Auth providerAuth0 (recommended) or AWS Cognito. Both support multiple user pools, custom claims, and MFA — required for institutional account security. Auth0 is preferred for its Action pipeline which allows custom logic at the token issuance step (e.g., injecting customer group ID and tier into the JWT).
B2C consumer authAuth0 Application: MGRM-B2C. Standard email/password + Google OAuth. JWT contains: user_id, email, customer_group: CONSUMER. Session duration: 30 days (remember me) or session-only. Consumer login → /my-account.
B2B institutional authAuth0 Application: MGRM-B2B. Email/password + SAML 2.0 / Azure AD SSO for enterprise hospital networks. JWT contains: user_id, email, institution_id, customer_group: INSTITUTIONAL_T1/T2/T3, account_manager_id, institution_name. Session duration: 8 hours (professional use pattern). B2B login → /institutional/dashboard.
Token validationNext.js middleware (middleware.ts) validates the JWT on every request to /institutional/*. If the token is absent, expired, or does not contain a B2B customer group claim, the middleware redirects to /institutional/login. This happens at the Edge — before any page rendering — preventing any B2B content from loading for unauthenticated users.
SAML / Azure AD SSORequired for large hospital networks (Fortis, Apollo, AIIMS) that use centralised identity management. Auth0's SAML connection allows the hospital's Azure AD to authenticate users — the user clicks Sign in with SSO on the B2B login page, is redirected to their hospital's Microsoft login, and returns with a valid session. MGRM never handles their password.
MFA requirementMFA is mandatory for all B2B institutional accounts (Auth0 Adaptive MFA or TOTP). Optional for B2C consumer accounts. The institutional portal contains sensitive pricing, compliance documents, and procurement data that require stronger authentication than consumer e-commerce.
Session separationA user logged into a B2C consumer account and a B2B institutional account simultaneously uses separate Auth0 sessions (separate browser storage namespaces). The B2C session does not grant any B2B portal access, and the B2B session does not render any B2C-only UI (wishlist, loyalty points, etc.).

1.4 — CRM Integration

CRM for B2B account management and quote tracking
Recommended CRMHubSpot CRM (Sales Hub Professional or Enterprise). Rationale: native Deal pipeline for quote tracking, Company records for institutional accounts, custom properties for tier assignment, and bi-directional API with Medusa.js for order sync. Alternative: Salesforce (more powerful but significantly more expensive and complex to configure).
Company recordsEvery verified institutional account in the B2B portal creates a HubSpot Company record. Properties: Institution name, Type (Hospital/Clinic/Distributor/College), GST number, City, State, Tier (T1/T2/T3), assigned Account Manager, portal login status, last login date.
Quote pipelineQuote requests from the B2B portal create HubSpot Deals in a custom Quote pipeline with 5 stages: Submitted → Under Review → Quote Sent → Accepted → Order Raised. The deal value is the estimated quote total. Account managers work the pipeline from their HubSpot inbox.
Account manager assignmentHubSpot Contact Owner = Account Manager. When a new institution is approved, the onboarding workflow assigns the Contact Owner based on territory (state). The assigned account manager's details (name, email, phone) are pulled into the B2B portal Account Manager card via the HubSpot API at dashboard load.
Order syncConfirmed orders from the B2B portal sync to HubSpot as closed deals. This populates the institution's order history in HubSpot, allows the account manager to track spend, and triggers the tier upgrade workflow when the 3-order milestone is reached.
Email automationHubSpot sequences send quote status update emails, renewal reminders for expiring compliance documents, and quarterly business review invitations for Tier 3 accounts. These are triggered by deal stage changes in the pipeline.

1.5 — Payment Gateway

Payment gateway — B2C consumer + B2B invoice/PO
B2C consumer paymentsRazorpay (primary recommendation for India). Supports: Credit/debit card (Visa, Mastercard, Rupay, Amex), UPI (GPay, PhonePe, Paytm, BHIM), net banking (all major Indian banks), EMI (no-cost EMI on major cards), and Cash on Delivery. Razorpay integrates natively with Medusa.js via the official Medusa Razorpay plugin. PCI DSS Level 1 compliant — card data never touches MGRM servers.
B2C payment flowStandard checkout → Razorpay hosted checkout page (or Razorpay Elements embedded) → payment confirmation webhook → Medusa.js order created. COD is handled as a deferred payment type — order is created, payment status is pending until delivery confirmation.
B2B invoice/PO paymentsB2B orders do not use Razorpay. The B2B quote-to-order flow generates an invoice via the MGRM billing system (Zoho Books or Tally integration). Payment methods: NEFT/RTGS bank transfer, cheque, or net credit terms (30/60 days). The portal records PO number and tracks payment status (Unpaid → Partially Paid → Paid) in Medusa.js order metadata.
Credit terms managementTier 2 institutions have 30-day net terms. Tier 3 institutions have 60-day net terms with a credit facility. Credit limits are stored in HubSpot Company properties and checked against outstanding invoices at quote request time. If an institution exceeds their credit limit, the quote system displays an alert and routes to the account manager.
Secondary B2C gatewayPayU or Cashfree as a backup payment processor. Medusa.js supports multiple payment providers — if Razorpay experiences downtime, the checkout falls back to the secondary provider without code changes.
EMI handlingRazorpay handles no-cost EMI — the bank charges the cardholder the full amount and MGRM pays the bank the interest subsidy. MGRM does not handle EMI financing directly. The EMI option in checkout uses Razorpay's EMI API to display available tenures and interest rates per card/bank.

1.6 — Full Recommended Technology Stack

Frontend
Next.js 14+ (App Router) TypeScript Tailwind CSS React 18 Framer Motion (animations)
SSR for B2C SEO pages. CSR for authenticated B2B portal. Edge middleware for auth guards.
Commerce engine
Medusa.js (self-hosted) PostgreSQL (primary DB) Redis (sessions + cache) Medusa Admin
Single product catalogue. Customer groups for B2C/B2B pricing split. Order management for both experiences.
Content / CMS
Sanity CMS (structured content) Sanity Studio (editorial UI) GROQ (content queries)
Recovery Hub articles, educational content, product descriptions, and B2B clinical resources managed by MGRM editorial team without code deploys.
Auth
Auth0 (B2C + B2B) SAML 2.0 / Azure AD SSO Auth0 Actions (JWT custom claims) MFA (TOTP, mandatory B2B)
Separate Auth0 Applications for B2C and B2B. Single tenant with different audience claims. Customer group injected into JWT at token issuance.
Integrations
Razorpay (B2C payments) HubSpot CRM (B2B pipeline) Zoho Books (invoicing) Twilio (WhatsApp/SMS) SendGrid (transactional email)
Telemedicine API (Doxy.me or Daily.co) Google Maps (Stockist Locator) AWS S3 (compliance doc storage)
Infrastructure
Vercel (Next.js hosting + Edge) AWS RDS PostgreSQL AWS ElastiCache Redis AWS S3 (document storage) Cloudflare CDN + WAF
Vercel handles Next.js edge functions, ISR, and CDN for static assets. AWS manages stateful services (database, cache, file storage). Cloudflare provides DDoS protection and caching at the DNS level.
Analytics
Google Analytics 4 (B2C) Mixpanel (B2B portal events) Hotjar (B2C UX heatmaps) Vercel Analytics (Core Web Vitals)
GA4 tracks B2C consumer journeys. Mixpanel tracks B2B portal engagement (quote requests, document downloads, login frequency). Separate measurement IDs ensure B2C and B2B data are never mixed.
Section 2

Conditional Content Display Rules

The same URL (e.g. a product page) renders different content based on the user's authentication state. This table defines exactly what is shown, hidden, or replaced across the three possible states: unauthenticated visitor, B2C consumer account, and B2B institutional account.

2.1 — Unauthenticated visitor (no login)

2.2 — B2B institutional user (logged in)

2.3 — B2C consumer user (logged in)

UI Element Not logged in B2C account logged in B2B institutional logged in
Header navigation Consumer nav (6 items) + Institutional Login ghost button + Search + Cart Consumer nav + My Account (filled) + Cart + Search. Institutional Login hidden. B2B portal nav (Catalogue / Quotes / Orders / Clinical Resources / Account) replaces consumer nav. User pill shows institution name + tier.
Product price display Consumer retail price (MRP shown if discount applies). "From ₹X" for products with variants. Same as unauthenticated. Loyalty points balance shown if applicable. Institutional unit price (volume tier at 1–10 units by default). MRP never displayed. Volume pricing table replaces single price.
Product CTA button Add to Cart (primary). "Institutional pricing available — Log in →" secondary text link. Add to Cart. Wishlist ♡ icon. Compare checkbox. Add to Quote List (Sky Blue). Add to Quote replaces cart entirely. No Add to Cart shown.
Product detail page — pricing section Single consumer price. MRP struck if on sale. Savings badge if applicable. Same as unauthenticated + loyalty points preview ("Earn X points"). 4-row volume pricing table (1–10 / 11–50 / 51–100 / 100+ with tier discounts). Live subtotal estimator. MOQ displayed.
Compliance / certification section on PDP Certification badge pills (CE, ISO, FDA) displayed. No download links. Same as unauthenticated. No download links. Full compliance section: 4-cert grid with certificate numbers + validity dates + download links (IFU PDF, spec sheet, CE Declaration, MSDS).
Cart / basket Standard consumer cart. Pharma safety checkboxes. Promo code. Order summary. Same as unauthenticated. Saved addresses pre-populated. Loyalty points redemption option. B2B users never see consumer cart. They are redirected to /institutional/quote-list. Consumer cart session is cleared on B2B login.
Checkout flow 3-step consumer checkout (delivery → payment → review). Razorpay payment options (card, UPI, EMI, COD). Same as unauthenticated but pre-filled with saved address and payment methods. No consumer checkout shown. B2B flow: Quote Basket → Quote Request Form (PO number, department, delivery address) → Submit to account manager.
Account page / Dashboard Not accessible. Redirects to /login. /my-account: orders, wishlist, health profile, addresses, Care Points. No B2B content. /institutional/dashboard: orders, quotes, compliance documents, account manager card, tier progress. No B2C account content (no loyalty points, no wishlist).
/institutional/* routes Middleware redirects all /institutional/* requests to /institutional/login. No content rendered. B2C JWT is rejected by B2B auth guard. Redirected to /institutional/login with message: "A consumer account cannot access the institutional portal. Apply for institutional access." Full B2B portal accessible according to tier (Tier 1 / T2 / T3 content gates enforced per section).
Recovery Hub / blog Full public access. All articles, videos, and newsletter signup visible. Same as unauthenticated + personalised article recommendations based on health profile conditions. B2B portal has its own clinical resources section (/institutional/clinical-resources). Recovery Hub is visible but institutional users are shown a banner: "Looking for clinical evidence and training? Visit your clinical resources hub →"
Telemedicine booking Book a consultation CTA visible. Routes to /find-care/telemedicine. Registration required to complete booking. Full booking flow accessible. Health profile pre-fills consultation context. Telemedicine patient booking is not shown in the B2B portal. Institutional telemedicine integration (for hospitals wanting to deploy MGRM telemedicine for their patients) is handled via a separate enterprise enquiry form.
Institutional Login button (header) Visible. Routes to /institutional/login. Visible. Routes to /institutional/login with a message suggesting the user applies for institutional access. Not shown. The user is already in the B2B portal — the header shows their institution name and tier instead.

2.4 — Implementation: Conditional rendering logic

Next.js — Auth context and user type hook
// lib/auth/useUserType.ts
import { useSession } from 'next-auth/react'

export type UserType = 'unauthenticated' | 'b2c' | 'b2b_t1' | 'b2b_t2' | 'b2b_t3'

export function useUserType(): UserType {
  const { data: session } = useSession()
  if (!session) return 'unauthenticated'
  const group = session.user?.customerGroup // Injected by Auth0 Action into JWT
  if (group === 'INSTITUTIONAL_T3') return 'b2b_t3'
  if (group === 'INSTITUTIONAL_T2') return 'b2b_t2'
  if (group === 'INSTITUTIONAL_T1') return 'b2b_t1'
  return 'b2c'  // CONSUMER group or any registered user
}
Product page — conditional price + CTA rendering
// components/product/ProductActions.tsx
export function ProductActions({ product }: { product: Product }) {
  const userType = useUserType()
  const isB2B = userType.startsWith('b2b')

  return (
    <div>
      {isB2B ? (
        <VolumePricingTable                    {/* Shows 4-tier institutional pricing */}
          productId={product.id}
          customerGroup={userType}
        />
      ) : (
        <ConsumerPriceDisplay                 {/* Shows MRP and retail price */}
          price={product.variants[0].prices[0]}
          compareAt={product.variants[0].compare_at_price}
        />
      )}

      {isB2B ? (
        <AddToQuoteButton productId={product.id} />
      ) : (
        <>
          <AddToCartButton variantId={product.variants[0].id} />
          {userType === 'unauthenticated' && (
            <InstitutionalPricingNudge />     {/* "Institutional pricing available" link */}
          )}
        </>
      )}
    </div>
  )
}
Next.js middleware — B2B route auth guard
// middleware.ts
import { NextResponse } from 'next/server'
import { getToken } from 'next-auth/jwt'

export async function middleware(req) {
  const pathname = req.nextUrl.pathname

  // B2B portal guard — all /institutional/* routes except login and register
  if (pathname.startsWith('/institutional') &&
      !pathname.includes('/institutional/login') &&
      !pathname.includes('/institutional/register')) {

    const token = await getToken({ req, secret: process.env.NEXTAUTH_SECRET })

    // No token → redirect to login
    if (!token) {
      return NextResponse.redirect(new URL('/institutional/login', req.url))
    }

    // B2C token → redirect to login with explanation
    if (token.customerGroup === 'CONSUMER') {
      return NextResponse.redirect(
        new URL('/institutional/login?reason=consumer-account', req.url)
      )
    }

    // Valid B2B token → proceed, inject tier into request headers
    const res = NextResponse.next()
    res.headers.set('x-user-tier', token.customerGroup)
    res.headers.set('x-institution-id', token.institutionId)
    return res
  }
}
Section 3

SEO Architecture

The dual-experience site must maximise crawlability and indexability for B2C pages (products, conditions, educational content, telemedicine) while ensuring B2B portal pages are never indexed — institutional pricing, compliance documents, and quote systems should not appear in search results.

3.1 — B2C public pages: crawlability and indexing

B2C SEO technical requirements
Rendering methodNext.js Server-Side Rendering (SSR) for all public B2C pages. Product pages, condition pages, and category pages are rendered on the server and returned as complete HTML — Google crawls the full content without executing JavaScript. This is critical for product and condition pages where the text content drives organic ranking.
Incremental Static Regeneration (ISR)Product pages are pre-built at build time and regenerated on demand (ISR with 60-minute revalidation). This combines the SEO benefit of static pages with the ability to update pricing and stock without a full rebuild. Product description, specifications, and schema markup are always current.
SitemapDynamically generated sitemap.xml at /sitemap.xml. Includes: all product pages (/products/[slug]), condition pages (/conditions/[body-area]/[slug]), Recovery Hub articles (/recovery-hub/[article-slug]), and static pages. Excludes: /institutional/*, /my-account/*, /cart, /checkout. Submitted to Google Search Console.
robots.txtUser-agent: * / Allow: / / Disallow: /institutional / Disallow: /my-account / Disallow: /cart / Disallow: /checkout / Disallow: /api / Sitemap: https://mgrmmedicare.com/sitemap.xml
Canonical URLsEvery public page includes a canonical meta tag pointing to itself. Product variant pages (size/colour) use the canonical pointing to the main product URL to prevent duplicate content. Condition sub-pages use structured canonical hierarchies.
Core Web VitalsLCP target: under 2.5 seconds. INP target: under 200ms. CLS: under 0.1. Achieved via: image optimisation (Next/Image with WebP), font preloading (Lora + Open Sans subsets), deferred non-critical JS, and edge caching via Cloudflare and Vercel Edge Network.
hreflangIf/when Hindi (hi-IN) and regional language versions are launched, hreflang tags in the document head and sitemap. English (en-IN) is the primary locale.
Priority crawl pages1. Condition pages (/conditions/*) — highest intent traffic. 2. Product pages (/products/*) — commercial intent. 3. Recovery Hub articles (/recovery-hub/*) — informational intent, builds topical authority. 4. Find Care pages (/find-care/*) — local/service intent.

3.2 — B2B microsite: preventing indexing

Critical: Institutional pricing must never appear in Google search results
If institutional pricing, compliance document URLs, or quote system pages are indexed, MGRM's competitive pricing strategy is exposed and the gated value of the B2B portal is undermined. Multiple defence layers are required.
B2B noindex implementation — multiple defence layers
Layer 1: robots.txtDisallow: /institutional/ — prevents Googlebot from crawling any /institutional/* URL. First and fastest line of defence.
Layer 2: X-Robots-Tag headerNext.js middleware adds the HTTP header X-Robots-Tag: noindex, nofollow to all responses from /institutional/* routes. Even if a Googlebot ignores robots.txt, the response header instructs it not to index the page.
Layer 3: Auth guard returns 302If Googlebot somehow reaches a B2B page, the middleware auth guard (Section 2.4) returns a 302 redirect to /institutional/login — Google does not index redirect destinations that require authentication.
Layer 4: No public linksNo B2B portal URL is linked from any public B2C page (only the /institutional gateway URL itself, via the Institutional Login button, is linked). Googlebot discovers pages by following links — deep B2B portal pages with no public inbound links will not be discovered even if robots.txt is misconfigured.
Layer 5: Search Console monitoringGoogle Search Console URL inspection tool is used weekly during the first 3 months post-launch to verify no /institutional/* pages appear in the index. Any indexed URLs are submitted for removal via the URL Removal Tool.
Document URLs (S3)Compliance documents are stored in a private AWS S3 bucket. Download links are pre-signed URLs that expire after 1 hour — they cannot be indexed by search engines because they expire before Googlebot can crawl them.

3.3 — Schema markup

JSON-LD schema markup — B2C public pages
Product pagesSchema.org/Product: name, description, image, brand (MGRM Medicare), sku, mpn (catalogue reference), offers (price, priceCurrency INR, availability, itemCondition), aggregateRating (when reviews present), category. All implemented as JSON-LD in document head via Next.js generateMetadata().
MedicalOrganizationOn the About MGRM page and homepage: Schema.org/MedicalOrganization: name, description, url, logo, address (India), contactPoint, medicalSpecialty, availableService (telemedicine, rehabilitation, pharmacy). Establishes MGRM as a medical entity in Google's Knowledge Graph.
FAQPageOn telemedicine page (Step 7) and product pages with FAQ sections: Schema.org/FAQPage with Question/Answer pairs. Enables FAQ rich results in Google Search — particularly valuable for condition guide pages (e.g. "How long does knee surgery recovery take?").
BreadcrumbBreadcrumbList schema on all product, condition, and article pages. Enables breadcrumb display in Google search results.
ArticleOn Recovery Hub articles: Schema.org/Article with headline, author, datePublished, dateModified, publisher (MGRM Medicare), image, description. Enables article rich results and Google Discover eligibility.
LocalBusinessOn the Stockist Locator page: Schema.org/PharmacyOrMedicalBusiness for MGRM head office. Individual stockist listings are not schema-marked (they are third-party businesses).
B2B portalNo schema markup on any /institutional/* page. Schema markup is a signal to search engines — B2B pages should not attract any search engine attention whatsoever.
Example: Product schema JSON-LD (product detail page)
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "ROM Knee Splint — Post-surgical",
  "description": "Adjustable range-of-motion knee splint for post-TKR and ACL recovery...",
  "sku": "MGRM-RS-ROM-M",
  "mpn": "2025-RS-001",
  "brand": { "@type": "Brand", "name": "MGRM Medicare" },
  "image": "https://mgrmmedicare.com/images/products/rom-knee-splint-m.jpg",
  "offers": {
    "@type": "Offer",
    "price": "3499",
    "priceCurrency": "INR",
    "availability": "https://schema.org/InStock",
    "seller": { "@type": "Organization", "name": "MGRM Medicare Pvt Ltd" }
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.8",
    "reviewCount": "312"
  }
}
Section 4

Security & Compliance

The MGRM platform handles health data (telemedicine consultations, health profiles), financial data (payment cards, institutional credit terms), and regulated content (pharmacy products, compliance certificates). Four distinct compliance frameworks apply.

4.1 — HIPAA alignment (telemedicine and health profile)

Note: HIPAA applies to US healthcare entities. For Indian operations, the equivalent is the Digital Personal Data Protection Act 2023 (DPDPA) combined with the Telemedicine Practice Guidelines 2020 (MoHFW). However, if MGRM serves NRI patients or US-based healthcare partners, HIPAA alignment is prudent and adds credibility.
Health data protection — telemedicine and health profile
Data categorisationProtected Health Information (PHI) includes: telemedicine consultation transcripts and video recordings, health profile data (conditions, recovery notes, medical history), prescription uploads, and vitals data from TeleKit device syncs. All PHI is stored separately from commercial data (orders, payments) in an isolated database schema with stricter access controls.
Encryption at restPHI stored in PostgreSQL with column-level encryption for sensitive fields (health_conditions, consultation_notes, prescription_image_url). AWS KMS manages encryption keys. S3 buckets storing telemedicine recordings and prescription PDFs use SSE-KMS with a separate key from non-PHI assets.
Encryption in transitTLS 1.3 minimum on all connections. HSTS (HTTP Strict Transport Security) with 1-year max-age. Certificate pinning on the MGRM Health mobile app. Telemedicine video streams use end-to-end encryption (WebRTC DTLS-SRTP via Doxy.me or Daily.co).
Access controlsPHI access requires role: CLINICAL_STAFF, PHARMACIST, or ACCOUNT_HOLDER (the patient themselves). No marketing, sales, or operational staff roles have access to PHI. Auth0 RBAC enforces this. All PHI access is logged to an immutable audit log (AWS CloudTrail).
Data retentionTelemedicine consultation records: retained for 7 years (MoHFW Telemedicine Guidelines 2020 requirement for medical records). Health profile data: retained while the account is active + 2 years after deletion request, then permanently purged. Prescription uploads: retained for 6 months then auto-purged unless flagged by pharmacist.
Business Associate AgreementsBAAs signed with all third-party vendors who handle PHI: telemedicine API provider (Doxy.me/Daily.co), AWS (hosting), Auth0 (identity — if Auth0 Actions touch health data), and any analytics tool that processes health profile data.
Breach notificationIncident response plan defines notification timelines: CERT-In (India) within 6 hours of breach discovery (as required by CERT-In 2022 directions). Affected users notified within 72 hours. If HIPAA-aligned: US HHS notification within 60 days of discovery of a breach affecting 500+ US residents.

4.2 — DPDPA 2023 (India) / GDPR compliance

Data protection compliance — India DPDPA 2023
Consent managementExplicit, informed consent collected at account registration for: (1) Processing personal data for order fulfilment. (2) Processing health data for telemedicine and health profile. (3) Marketing communications (separate opt-in, not bundled with account creation). Consent records stored with timestamp, user ID, and consent text version.
Data Principal rightsDPDPA grants users rights to: access their data, correct inaccurate data, erase their data (subject to legal hold for medical records), nominate a representative, and withdraw consent. These rights are implemented in the /my-account settings page with self-service controls where possible, and a 30-day fulfilment SLA for manual requests.
Data Fiduciary obligationsMGRM is a Data Fiduciary under DPDPA. A Data Protection Officer (DPO) is designated. Privacy Policy is published at /privacy-policy. A Data Protection Impact Assessment (DPIA) is conducted for the telemedicine health data processing before launch.
Cross-border data transfersPersonal data of Indian residents is stored on AWS servers in the Mumbai (ap-south-1) region. No personal data is transferred outside India without explicit consent. If analytics tools (GA4, Mixpanel) process data outside India, standard contractual clauses and data processing agreements are in place.
Cookie consentCookie consent banner on first visit (B2C site only). Categories: Essential (always on), Analytics (opt-in), Marketing (opt-in). The B2B portal sets session cookies only — no marketing cookies in the authenticated portal. Cookie preferences stored in the user's browser and account preferences.
Children's dataMGRM B2C site: minimum age 18 for account creation (except where a parent/guardian registers for a child's paediatric telemedicine consultation). Age verification at registration. The telemedicine service for children under 12 requires a parent to be present — this is verified in the consultation booking flow.

4.3 — Institutional document security

Compliance certificate download security and audit logging
Document storageAll compliance documents (ISO certificates, CE declarations, CDSCO licences, MSDS, IFUs) are stored in a private AWS S3 bucket: mgrm-compliance-docs-private. No public access. The bucket is not accessible via direct S3 URL.
Download mechanismWhen an authenticated institutional user requests a document download, the Next.js API route: (1) Validates the user's B2B session token. (2) Logs the download event (user ID, institution ID, document ID, timestamp, IP address) to the audit log database. (3) Generates a pre-signed S3 URL valid for 1 hour. (4) Returns the pre-signed URL to the client. The client's browser downloads directly from S3 — MGRM servers are not in the download bandwidth path.
Audit logEvery document download is logged to an immutable audit table in PostgreSQL (INSERT-only, no UPDATE/DELETE permissions for application users). Log fields: document_id, document_name, institution_id, user_id, user_email, download_timestamp, ip_address, user_agent. Retained for 3 years. Accessible to MGRM compliance team via admin dashboard.
Document versioningWhen a compliance document is renewed (e.g. ISO certificate) the new version is uploaded to S3 with a version suffix. The old version is retained (not deleted) for audit trail purposes — if a hospital downloaded a certificate on a specific date, MGRM can prove what version was current on that date.
Dossier generationThe "Download all compliance documents" feature generates a ZIP file server-side from the current document set. The ZIP is generated on demand (not pre-built) and the pre-signed download URL expires in 4 hours. ZIP generation is also audit-logged.
Access control per documentSome documents are Tier 2+ only (e.g. marketing collateral, co-branded templates). The API route checks the user's customer group claim in the JWT before generating the pre-signed URL — attempting to download a Tier 3 document with a Tier 1 token returns HTTP 403.

4.4 — PCI DSS for consumer payment processing

PCI DSS compliance — consumer checkout
Compliance levelMGRM is a PCI DSS Level 4 merchant (fewer than 20,000 Visa/Mastercard e-commerce transactions per year initially). Annual Self-Assessment Questionnaire (SAQ A) is required — applicable because card data is fully handled by Razorpay, not MGRM servers.
Cardholder data scopeCard numbers, CVVs, and expiry dates NEVER touch MGRM servers or databases. The Razorpay Hosted Checkout or Razorpay.js (embedded tokenisation) handles all card input — card data goes directly from the user's browser to Razorpay's PCI DSS Level 1 certified servers. MGRM receives only a Razorpay payment ID and masked card details (last 4 digits, card brand).
Network segmentationThe payment processing domain (mgrmmedicare.com/checkout) is served from Vercel's edge network. No payment data is routed through MGRM's application servers or stored in MGRM's database. AWS infrastructure hosting the Medusa.js backend is logically separated from any payment processing network segments.
Vulnerability scanningQuarterly ASV (Approved Scanning Vendor) scans of external-facing IP addresses and domains. Annual penetration test by a PCI SSC approved QSA. Cloudflare WAF provides real-time protection against OWASP Top 10 attacks.
Razorpay integration securityRazorpay webhook signatures are verified using HMAC-SHA256 on every incoming webhook — preventing order manipulation via forged webhook events. Razorpay API keys are stored in environment variables (Vercel encrypted env vars) — never in code or git repositories.
UPI and wallet paymentsUPI and digital wallet payments (GPay, PhonePe, Paytm) are processed via Razorpay's VPA (Virtual Payment Address) system — no card data involved, no PCI DSS scope. MGRM receives the UPI transaction reference ID.
Section 5

Dual-Experience Launch Checklist — 25 Points

A complete pre-launch checklist covering B2C site, B2B microsite, and integrated testing. All 25 items must be confirmed by the responsible team member before the site goes live. Items are colour-coded by domain: B2C (blue) · B2B (navy) · Integrated (teal) · Security (orange).

B2C Site — Items 1–10

  • 1
    B2C · Pages
    All B2C pages live and rendering correctly. Homepage, all 6 primary nav destinations, all condition sub-pages (28 conditions), all product category pages, all active PDPs, checkout flow (3 steps), order confirmation, my account, telemedicine, stockist locator, Recovery Hub, and footer links verified. No 404s on linked pages.
  • 2
    B2C · Mobile
    Full mobile responsiveness verified across key breakpoints. Tested at 375px (iPhone SE), 390px (iPhone 14), 768px (iPad), and 1440px (desktop). Navigation hamburger menu functional. Product grid collapses to single column. Checkout flow usable on mobile. Core Web Vitals (LCP, INP, CLS) pass Google's thresholds on mobile.
  • 3
    B2C · Checkout
    End-to-end consumer checkout flow tested with all payment methods. Test transactions completed via: credit card (Razorpay sandbox), UPI (test VPA), net banking (bank simulator), COD (deferred payment type). Pharma product safety checkboxes confirmed mandatory before checkout proceeds. Order confirmation email received. Inventory decrement confirmed in Medusa.js admin.
  • 4
    B2C · SEO
    SEO meta tags, canonical URLs, and schema markup verified on all key page types. Title tags (under 60 characters), meta descriptions (under 160 characters), Open Graph tags, and JSON-LD schema confirmed on: homepage, 3 sample product pages, 3 condition pages, 3 Recovery Hub articles. Sitemap.xml accessible at /sitemap.xml and submitted to Google Search Console. robots.txt confirmed correctly disallowing /institutional/ and /my-account/.
  • 5
    B2C · CTAs
    All consumer-facing CTAs function correctly. "Book your first consultation — free" (telemedicine) routes to booking flow. "Find a stockist" routes to locator with map loading. "Add to Cart" adds correct variant to cart. "Proceed to Checkout" disabled if pharma checkboxes unticked. Newsletter signup submits to email marketing list. "Institutional Login" in header routes to /institutional/login.
  • 6
    B2C · Content
    All product content, pricing, and images confirmed accurate. Institutional pricing does NOT appear on any public B2C page (including page source). No broken images (404 on any product, category, or lifestyle image). Product descriptions reviewed against CDSCO regulatory guidelines — no misleading medical claims. Pharmacy product dosage information visible and not collapsible.
  • 7
    B2C · Account
    B2C consumer account flows tested end-to-end. Registration → email verification → account creation → first order → order history → invoice download. Password reset flow tested. WhatsApp order notification confirmed (Twilio integration). Loyalty points earned on test order displayed in account dashboard. Health profile (conditions + recovery notes) saves and displays correctly.
  • 8
    B2C · Performance
    Page performance verified using Google PageSpeed Insights and Vercel Analytics. B2C homepage LCP under 2.5 seconds. Product page LCP under 2.5 seconds. No layout shift on font/image load (CLS under 0.1). Lighthouse Performance score above 85 on mobile. Time to First Byte (TTFB) under 400ms for SSR pages.
  • 9
    B2C · Telemedicine
    Telemedicine booking flow verified. Speciality selection → slot selection → consultation booking → confirmation email → video link delivered. Test consultation conducted via telemedicine platform (Doxy.me or Daily.co) confirming video/audio quality. Prescription upload in checkout tested for Rx products. TeleKit Pro device sync tested with MGRM Health app (if applicable at launch).
  • 10
    B2C · Analytics
    GA4 tracking confirmed for all key B2C conversion events. Events verified in GA4 DebugView: page_view (all pages), add_to_cart, begin_checkout, purchase (order confirmed), sign_up (new account), generate_lead (telemedicine booking). Conversion goals set in GA4 for: purchase, telemedicine_booking, newsletter_signup. Hotjar heatmaps recording on homepage, product pages, and checkout. GA4 property confirmed as India-only data residency.

B2B Microsite — Items 11–20

  • 11
    B2B · Login
    Login gateway functioning correctly for all authentication paths. Email/password login tested. "Forgot password" flow sends reset email and allows password reset. "Remember this device for 30 days" persists session across browser restarts. SAML/Azure AD SSO tested with a test Azure AD tenant (simulating hospital enterprise login). Invalid credentials show appropriate error (not user-not-found vs wrong-password — prevent user enumeration).
  • 12
    B2B · Registration
    Institution registration and verification flow fully tested. 3-section registration form submits successfully. GST validation API returns correct result for valid and invalid GST numbers. Auto-approval triggers for test "known hospital" submission. Manual review queue receives notification for new distributor submission. Approval email received with correct login credentials. Rejection email (with reason) tested. 2-business-day manual review SLA confirmed with MGRM operations team.
  • 13
    B2B · Test accounts
    3 institutional test accounts created across all tiers, verified functioning. Test Account 1: Tier 1 Verified Buyer (hospital type) — confirms access to institutional catalogue + compliance docs, confirms no marketing collateral access. Test Account 2: Tier 2 Partner Account (clinic type) — confirms volume pricing tiers display, account manager card populates, marketing collateral section accessible. Test Account 3: Tier 3 Strategic Partner (distributor type) — confirms custom pricing field in system, all Tier 3-locked content accessible. All test accounts cleaned from production before launch.
  • 14
    B2B · Pricing
    Institutional pricing confirmed correct for all 3 tiers on all product types. Tier 1 pricing (standard institutional list) matches approved price list document. Tier 2 volume discount tiers (50+, 100+, 500+ units) apply correctly in quote basket. MRP/consumer price NEVER appears in any B2B page (verified by checking page source on 10 sample products). Live tier price update in quote basket confirmed (quantity change crosses tier boundary → price updates without page reload).
  • 15
    B2B · Quote system
    Quote request system tested end-to-end. Add to Quote from catalogue. Add to Quote from product detail page. Quote basket: items display, quantities editable, tier pricing live, subtotal correct. Quote request form: all fields submit, PO number optional confirmed, institution name pre-filled and readonly. Quote confirmation screen shows reference number. HubSpot Deal created in correct pipeline stage on submission. Account manager receives email notification with quote details. Confirmation email received by test institutional user.
  • 16
    B2B · Orders
    B2B order management verified. Orders list populates from Medusa.js order data. PO number visible on each order card. Status badges update correctly (In Transit / Delivered). Invoice PDF download generates correctly with institutional letterhead. Packing slip download confirmed. Reorder flow: clicking Reorder creates a new pre-populated quote request with original items and quantities. Order detail expandable panel shows correct line items with SKUs.
  • 17
    B2B · Compliance docs
    All compliance document downloads verified. All 8 sample documents download as PDF from their respective rows. Pre-signed S3 URLs generated correctly (verify URL format includes X-Amz-Expires parameter). Audit log entry created for each download (verified in admin database). Download All ZIP generates correctly and contains all documents in the correct folder structure. Request specific document form submits to the MGRM compliance team inbox. Expiring document (CDSCO Licence) shows amber validity indicator correctly.
  • 18
    B2B · Clinical resources
    Clinical evidence library and training resources accessible and correct. All 4 study cards display with correct data. Filter pills filter the evidence grid correctly. Clinical summary PDFs download. Training guides (PDF type) download. Training videos play (if hosted on Vimeo/YouTube). CPD module pages are accessible. On-site training request form submits for Tier 2 test account. Confirm that Tier 1 test account sees training form but cannot submit (disabled button with tooltip).
  • 19
    B2B · Marketing collateral
    Marketing collateral section verified for all tier states. Tier 1 test account sees full-page tier gate (not individual locked items). Tier 2 test account can download brochures, product images, and POS materials. Tier 3-locked items visible to Tier 2 account with amber lock overlay and disabled state confirmed (attempt to download via modified URL returns HTTP 403). Tier 3 test account can download all collateral including locked items. Co-brand approval process note displays correctly.
  • 20
    B2B · Security
    B2B portal security hardened and verified. robots.txt Disallow: /institutional/ confirmed. X-Robots-Tag: noindex,nofollow header present on all /institutional/* responses (verified via curl). Direct URL access to /institutional/dashboard without token returns 302 to /institutional/login (not a 200 with empty content). B2C JWT rejected at B2B middleware (confirmed with Tier 2 B2B test account JWT replaced with B2C JWT — should return 302). MFA required for all B2B accounts confirmed in Auth0 policy. Audit log recording confirmed for document downloads. HTTPS enforced (HTTP → HTTPS redirect confirmed). HSTS header present.

Integrated — Items 21–25

  • 21
    Integrated
    "Institutional Login" button in B2C header links and renders correctly. Ghost button appears in all B2C page headers (homepage, product pages, category pages, Recovery Hub, telemedicine, stockist locator). Clicking routes to /institutional/login. On the login page, header contains only logo + portal badge + "Back to mgrmmedicare.com" (NO consumer nav). Confirm consumer nav is absent on the login gateway page. "Back to mgrmmedicare.com" link returns to homepage.
  • 22
    Integrated
    B2B users cannot access B2C-only pages without logging out. While logged into B2B test account: navigate to /my-account (should redirect to /institutional/dashboard or show B2B account view, not B2C account). Navigate to /cart (should redirect to /institutional/quote-list). Navigate to /checkout (should redirect). Confirm no consumer loyalty points, wishlist, or Care Points UI visible in any B2B portal view. Confirm institutional users cannot see consumer pricing on product pages while logged into B2B session.
  • 23
    Integrated
    Analytics tracking correctly separates B2C and B2B sessions. GA4 B2C property receives page_view events from public B2C pages but NOT from /institutional/* pages. Mixpanel B2B property receives events from /institutional/* but not from public B2C pages. No cross-contamination of B2C and B2B event data verified by testing both journeys in sequence with network request inspection. GA4 does not receive any B2B institutional pricing data or document download events. B2B user session does not appear in GA4 reports.
  • 24
    Integrated
    Single product catalogue confirmed powering both experiences correctly. Add a new test product in Medusa.js admin → confirm it appears in B2C catalogue with consumer price → confirm it appears in B2B institutional catalogue with institutional price (Tier 1). Update B2C product description in Medusa.js admin → confirm update reflects on B2C product page. Update institutional price in Medusa.js price list → confirm B2B portal product page shows new price, B2C page shows unchanged consumer price. Confirm product is never accidentally shown with institutional pricing on the public B2C site.
  • 25
    Security + Legal
    Legal and compliance sign-off complete before launch. Privacy Policy (DPDPA 2023 compliant) published at /privacy-policy and linked from all page footers. Terms of Sale published at /terms. Cookie consent banner live and functioning (preferences saved to user account/localStorage). CDSCO product licences verified current for all active pharmaceutical products. Legal counsel sign-off on telemedicine service Terms (MoHFW Telemedicine Guidelines 2020 compliance). ISO 13485 and CE certificates uploaded to compliance document library and verified downloadable. Data Processing Agreements signed with all third-party data processors (AWS, Auth0, Razorpay, HubSpot, Mixpanel). Incident response plan documented and shared with operations team. Contact details for DPO (Data Protection Officer) published in Privacy Policy.
MGRM Medicare Pvt Ltd · Technical Specification · Step 14 · Confidential
← Go Back